package org.cmg.study.spring.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

/**
 * @author CMG
 * @version 1.0
 * @cLassName FMViewController
 * @description
 * @date 2021/9/3 14:16
 **/
@Controller
@RequestMapping("/test")
public class ViewController {

    @RequestMapping("/freemarker")
    public ModelAndView freemarker() {
        ModelAndView mv = new ModelAndView();
        mv.addObject("username", "BianChengBang");
        mv.setViewName("freemarker");
        return mv;
    }
}
